<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Guestbook extends MX_Controller  {

	function __construct(){
		parent::__construct();
		$this->load->library('form_validation');
	}
	
	public function index()
	{
		$this->load->model("Model_Guestbook");
		/*
		$this->form_validation->set_rules('name', 'Name', 'required');
		$this->form_validation->set_rules('message', 'Message', 'required');
		if ($this->form_validation->run() == FALSE)
		{
			*/
			//$data['data']=$this->Model_Guestbook->get_entry();
			$data = array();
			$this->load->view('guestbook',$data);
		/*
		}
		else
		{
			$data=array(
			"name"=>$this->input->post("name"),
			"message"=>$this->input->post("message")
			);
			$this->model_guestbook->insert_entry($data);
			redirect("guestbook/index");
		}
		*/
	}
	public function insert()
	{
		
		$this->load->model("model_guestbook");
		
	}
}